Sensor device provided with a circuit for detection of single or multiple events for generating corresponding interrupt signals

ABSTRACT

A sensor device for an electronic apparatus is provided with: a sensing structure generating a first detection signal; and a dedicated integrated circuit, connected to the sensing structure, detecting, as a function of the first detection signal, a first event associated to the electronic apparatus and generating a first interrupt signal upon detection of the first event. The dedicated integrated circuit detects the first event as a function of a temporal evolution of the first detection signal, and in particular as a function of values assumed by the first detection signal within one or more successive time windows, and of a relation between these values.

TECHNICAL FIELD

The present disclosure generally relates to a sensor device providedwith a circuit for detecting single or multiple events, for generatingcorresponding interrupt signals. In particular but not exclusively, thefollowing treatment will make specific reference, without this implyingany loss of generality, to an accelerometer sensor device and todetection of events based on the analysis of the changes over time(i.e., temporal evolution) of acceleration signals detected by theaccelerometer sensor.

BACKGROUND INFORMATION

As is known, the increasing use of portable apparatuses—such as laptops,PDAs (Personal Data Assistants), digital audio players, cellphones,digital camcorders, and the like—or electronic apparatuses in general(personal computers, consoles for videogames and associated peripherals,etc.) has led to an increasing need to simplify use thereof, inparticular as regards the user interface. In this connection, thepossibility of activating given functions or programs of theseapparatuses by a simple user control action directly involving theelectronic apparatus has been considered of particular interest (forexample, a displacement or an inclination of the apparatus, or a forceor pressure exerted on the same apparatus).

For this purpose, in some electronic apparatuses, sensor devices havebeen introduced for detection of control actions imparted by the user(for example, inertial sensors, such as accelerometers or gyroscopes).In particular, the use of MEMS (micro-electromechanical systems)sensors, made with semiconductor technologies, has proven advantageousgiven their small dimensions and consequent small area occupation. Amicroprocessor circuit, supervising the general operation of theelectronic apparatus, is able to determine user control actions and toactivate corresponding functions or programs within the apparatus, viamonitoring of the detection signals generated by the sensor devices.

Moreover, the use of detection signals coming from sensor devices onboard the electronic apparatuses has been proposed for recognition, viasuitable processing operations, of particular apparatus conditions, suchas for example, a condition of free fall, or of reactivation fromstand-by (wake-up function).

Solutions of this sort, although having the potential advantage ofsimplifying the interface and improving the general functionality ofelectronic apparatuses, have the problem of burdening the apparatusmicroprocessor circuit with continuous monitoring of the detectionsignals from the sensor devices, and processing of the same signals forrecognition of the control actions exerted by the user or of theaforesaid conditions (more in general, of “events” associated to theelectronic apparatuses). There follows a general degradation of theperformance of the electronic apparatus, and/or a poor promptnessthereof in recognizing the aforesaid events.

In order to overcome this problem, the integration within the sensordevices of event-recognition related functions has recently beenproposed. In particular, a dedicated integrated circuit has beenassociated to a detection structure of these devices, the circuit beingdesigned to carry out simple processing operations based on the signalsgenerated by the detection structure for recognition of given events(for example, free-fall or wake-up events). Upon recognition of anevent, the integrated circuit generates an interrupt signal for themicroprocessor circuit of the electronic apparatus that incorporates thesensor device so that it can promptly activate appropriate actionsassociated to the detected event, this without using internal resourcesfor event recognition.

However, also due to the small amount of resources and the small areaavailable for integration within the sensor devices, the aforesaidintegrated circuits are not currently able to carry out complexprocessing operations on the detection signals, necessary for example,for recognition of particular (e.g., multiple) events, so that thecomputational burden for the microprocessor circuits on board theportable apparatuses in given applications remains high.

BRIEF SUMMARY

One embodiment of the present invention overcomes the aforesaid problemsand disadvantages and provides a sensor device, provided with anintegrated circuit for processing detected signals, that will be able toidentify even particular or multiple events.

According to one embodiment of the present invention, a sensor device isconsequently provided, the sensor device including:

a sensing structure configured to generate at least a first detectionsignal; and a dedicated integrated circuit coupled to said sensingstructure and configured to detect, as a function of said firstdetection signal, at least a first event associated to said electronicapparatus, and to generate a first interrupt signal upon detection ofsaid first event, wherein said dedicated integrated circuit isconfigured to detect said first event as a function of a change overtime (i.e., temporal evolution) of said first detection signal.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

For a better understanding, one or more embodiments are now described,purely by way of non-limiting and non-exhaustive examples and withreference to the attached drawings, wherein:

FIG. 1 is a block diagram of an electronic apparatus having a sensordevice according to one embodiment of the present invention;

FIG. 2 shows a general block diagram of one embodiment of a circuitintegrated in the sensor device of FIG. 1;

FIG. 3 shows a more detailed block diagram of the integrated circuit,according to a particular embodiment of the present invention;

FIGS. 4a, 4b and 5 show example plots of quantities related to oneembodiment of the sensor device;

FIG. 6 shows a state transition diagram in a finite-state-machine stageof the integrated circuit of FIG. 3 according to one embodiment;

FIG. 7 shows a block diagram of a variant of an analysis stage of theintegrated circuit of FIG. 3 according to one embodiment; and

FIG. 8 shows a variant for part of the state transition diagram of FIG.6 according to one embodiment.

DETAILED DESCRIPTION

In the following description, numerous specific details are given toprovide a thorough understanding of embodiments. The embodiments can bepracticed without one or more of the specific details, or with othermethods, components, materials, etc. In other instances, well-knownstructures, materials, or operations are not shown or described indetail to avoid obscuring aspects of the embodiments.

Reference throughout this specification to “one embodiment” or “anembodiment” means that a particular feature, structure, orcharacteristic described in connection with the embodiment is includedin at least one embodiment. Thus, the appearances of the phrases “in oneembodiment” or “in an embodiment” in various places throughout thisspecification are not necessarily all referring to the same embodiment.Furthermore, the particular features, structures, or characteristics maybe combined in any suitable manner in one or more embodiments.

The headings provided herein are for convenience only and do notinterpret the scope or meaning of the embodiments.

FIG. 1 shows an embodiment of an electronic apparatus 1 (for example, aportable apparatus such as a mobile phone, a laptop, a PDA, a digitalaudio player, a digital camcorder, or the like), comprising a sensordevice 2 and a microprocessor circuit 3, connected to the sensor device2 (for example, the microprocessor circuit 3 and the sensor device 2 areboth coupled to a printed-circuit board 4 inside the electronicapparatus 1). The sensor device 2 comprises a sensing structure 5 and adedicated integrated circuit 6, basically of a hardware type, connectedto the sensing structure 5. The sensing structure 5 generates detectionsignals associated to the condition of the electronic apparatus 1 (whichare treated and possibly converted into digital form with a givenrefresh rate, in a known way that is not described in detail herein),and the dedicated integrated circuit 6 processes the detection signalsfor generating at output, continuously and in real time, interruptsignals INT for the microprocessor circuit 3, upon occurrence of givenevents. The sensing structure 5 and the dedicated integrated circuit 6are integrated in the same chip with the same package, in one embodimentalso in the same die of semiconductor material; for example, the sensingstructure 5 is made with MEMS technology, and the dedicated integratedcircuit 6 is made with CMOS processes.

As will be described in what follows, an embodiment of the presentinvention envisages that the dedicated integrated circuit 6 will be ableto recognize the change over time (i.e., temporal evolution) of thedetection signals within a given time window, or in successive timewindows, so as to detect particular events (for example, ones having apre-set duration), or multiple events (for example, repeated at pre-settime intervals). The dedicated integrated circuit 6 is basically able todetect events not only based on the instantaneous value of the detectionsignals, but also based on the time window in which the detectionsignals assume this value and based on the relation with past values ofthe same signals.

FIG. 2 is a block diagram illustrating one embodiment of a circuitintegrated in the sensor device of FIG. 1. FIG. 2 includes a timingstage, configured to generate a time signal indicative of a time windowin which the first detection signal assumes the instantaneous value. Thetiming stage includes a counter, configured to generate a count signalbased on a clock signal and to be reset by a reset signal supplied bythe control stage, a storage register, configured to store time valuesassociated to time windows and to supply at output one of the timevalues as a function of a current-state signal received by the controlstage, and a comparator, coupled to the counter and to the storageregister and configured to compare the count signal with the time valueto generate the time signal. FIG. 2 also includes a control stage,coupled to the analysis stage and to the timing stage and configured togenerate the first interrupt signal as a function of the event signaland the time signal. The control stage includes a finite-state machine,a state transition of which is determined by values of the event signaland of the time signal.

In detail, the dedicated integrated circuit 6 of one embodimentcomprises (FIG. 2): an analysis stage 10, that receives at its input thedetection signals from the sensing structure 5 (not illustrated herein),carries out an analysis based on the instantaneous value of thesedetection signals, and generates an event signal Ev (for example, abinary signal) upon recognition of a condition potentially indicative ofan event associated to the electronic apparatus 1; afinite-state-machine (FSM) stage 12, which receives at its input theevent signal Ev and a time signal T, and generates at its output theinterrupt signals INT, a reset signal Res, and a current-state signal S;a counter stage 14, which receives at its input a clock signal CK (thefrequency of which can be set from outside) and the reset signal Res,and supplies at its output a count signal Cnt; a time register 15,storing time values T_(s) corresponding to pre-set time intervals (forexample, ranging between 0 and 128 ms, with steps of 0.5 ms), andsupplying at its output one of the time values as a function of thecurrent-state signal S coming from the FSM stage 12; and a digitalcomparator stage 16, receiving at its input the count signal Cnt and thetime value T_(s) from the counter stage 14, and supplying at its outputthe time signal T (having a binary value).

If the value of the detection signals received at input satisfies givenconditions, the analysis stage 10 recognizes a potential event andgenerates an event signal Ev having a given value (for example, the highvalue “1”). The counter stage 14 increments the count signal Cnt at eachcycle of the clock signal CK, and when the count signal Cnt exceeds thetime value T_(s) stored in the time register 15, the time signal T atoutput from the digital comparator stage 16 also assumes a high value.The FSM stage 12 evolves as a function of the values of the event signalEv and the time signal T, a high value of one and/or the other of thetwo signals determining a transition from one state to another (as willbe described in detail hereinafter). Evidently, the interrupt signalsINT generated at output from the FSM stage 12 are a function not only ofthe instantaneous value of the detection signals (based on the eventsignal Ev), but also of the time window in which this value is found(based on the time signal T), and of the past values of the same signals(on account of the very nature of the finite-state machine). Accordingto the state transition, the FSM stage 12 can also reset the counterstage 14 (and hence the count signal Cnt) via the reset signal Res, andmodify the time value T_(s) at output from the time register 15 so as toset the value of the time window based on which the digital comparatorstage 16 makes the comparison.

One embodiment of the present invention is now described, for detectionof single and/or double “click” events in the electronic apparatus 1,where by “click” is meant an event comparable to the pressure on a keyor push-button, generated by a force/pressure exerted by the user (forexample, by a slight tap) on a casing of the electronic apparatus 1,e.g., on a given portion thereof.

In a known way, electronic apparatuses are provided with one or morekeys or push-buttons that enable, via pressure thereon, entry ofcommands (since the pressure produces a sound event, the operation of akey is commonly defined as “click” or “click event”). In particular, asingle pressure (single-click event) or a consecutive double pressure(double-click event) of a key are designed to generate differentcommands and must consequently be distinguished during a detection step.

In the specific case, the pressure exerted by the user on the casing ofthe portable apparatus 1 is comparable to a click event, and causes amechanical stress within the casing reaching the sensor device 2. Inorder to detect the mechanical stress, the corresponding sensingstructure 5 comprises a triaxial linear inertial sensor (in particular,an accelerometer) of a MEMS type, which detects a first accelerationsignal A_(x), a second acceleration signal A_(y), and a thirdacceleration signal A_(z), corresponding to the components of theacceleration acting on the electronic apparatus 1 along threeindependent axes of detection, orthogonal to one another and forming aset of three cartesian axes. In a per-se known manner (and for thisreason not illustrated), the inertial sensor is made up of elasticallymobile elements and fixed elements, and in particular comprises a mobilemass associated to which are mobile electrodes, and fixed electrodesarranged, in pairs, on opposite sides of a respective mobile electrode,to form therewith a pair of differential capacitors for each axis ofdetection. When the sensor is subjected to forces, and accelerationsacting along the three axes of detection x, y, and z, the mobileelements of the sensor undergo an inertial displacement with respect tothe fixed elements, which is proportional to the acceleration to whichthe sensor is subjected. Corresponding capacitive variations are thusgenerated, one for each axis of detection. In this way, the sensingstructure 5 is able to detect click events occurring along any one ofthe axes of detection x, y, z.

In greater detail, and with reference to FIG. 3, one embodiment of thededicated integrated circuit 6 receives at its input alternately thefirst, the second, or the third detection signal A_(x), A_(y), A_(z).For example, the axis of detection and the corresponding detectionsignal can be selected through a control register (not illustrated), orelse the detection signals A_(x), A_(y), A_(z) can be suppliedalternately at pre-set time intervals by a multiplexer (notillustrated), set between the sensing structure 5 and the dedicatedintegrated circuit 6. The analysis stage 10 comprises an analogcomparator, which receives the detection signal A_(x), A_(y), A_(z) anda first acceleration threshold A_(Th1) (which can be set from outside)and generates the event signal Ev as a function of the relation betweenthe detection signal and the acceleration threshold. For example, in theanalysis stage 10 the absolute value of the detection signal A_(x),A_(y), A_(z) can be extracted, the first acceleration threshold A_(Th1)can have a given positive value, and the event signal Ev can have a highvalue when the detection signal A_(x), A_(y), A_(z) is greater than thefirst acceleration threshold A_(Th1). The FSM stage 12 generates at itsoutput first interrupt signals corresponding to the single-click eventalong the three axes of detection x, y, z (designated, respectively, byINT1 x, INT1 y, INT1 z), and second interrupt signals corresponding tothe double-click event once again along the three axes of detection(designated, respectively, by INT2 x, INT2 y, INT2 z). For reasons thatwill be clarified in what follows, the time register 15 stores in thiscase three time values T_(s), different from one another: a limit timevalue T_(s1), a latency time value T_(s2), and a window time valueT_(s3), which are sent to the digital comparator stage 16 as a functionof the current-state signal S.

In particular, and as illustrated in FIG. 4a , the dedicated integratedcircuit 6 is configured so as to detect a single-click event along oneof the axes of detection x, y, z and to generate the corresponding firstinterrupt signal INT1 x, INT1 y, INT1 z, when the value of the detectionsignal A_(x), A_(y), A_(z) along the axis of detection exceeds the firstacceleration threshold A_(Th1), and subsequently returns below the samethreshold within a predetermined time interval, in particular within thelimit time value T_(s1). Instead, as illustrated in FIG. 4b , nointerrupt signal is generated in the case where the detection signalA_(x), A_(y), A_(z) returns below the first acceleration thresholdA_(Th1) after the aforesaid time interval has already elapsed (the countsignal Cnt has consequently exceeded the limit time value T_(s1)).

As illustrated in FIG. 5, the dedicated integrated circuit 6 is furtherconfigured so as to recognize a double-click event along one of the axesof detection x, y, z and to generate the corresponding second interruptsignal INT2 x, INT2 y, INT2 z, when, in two consecutive time intervals,the value of the detection signal A_(x), A_(y), A_(z) along this axis ofdetection remains above the first acceleration threshold A_(Th1) for atime shorter than the one corresponding to the limit time value T_(s1).In particular, the second threshold crossing must not occur beforeexpiry of a latency time interval, corresponding to the latency timevalue T_(s2), from recognition of the single-click event, and also, oncethe latency time interval has elapsed, crossing of the threshold mustoccur within a time window corresponding to the window time valueT_(s3). The second click event must occur with the same modalities asthe first click event, and consequently the detection signal must returnbelow the first acceleration threshold A_(Th1) before expiry of thelimit time value T_(s1). During the latency time interval, any possibleexceeding of the threshold by the detection signal is ignored (possiblebounce signals on the detection signal are in this way filtered out).Instead, no interrupt signal is generated in the case where the secondthreshold crossing occurs after the window time value T_(s3), or else inthe case where the second threshold crossing, although occurring withinthe aforesaid window, lasts for a period longer than the limit timevalue T_(s1).

Operation of one embodiment of the FSM stage 12 for recognition of thesingle-click and double-click events is now described with reference tothe state transition diagram of FIG. 6. Transition from one state to thenext depends on the value of the event signal Ev and/or the valuereached by the count signal Cnt (which determines the value of the timesignal T). When the counter stage 14 is to be reset, in order to startagain counting in the next state, the reset signal Res is set to a highstate. The finite-state machine 12 evolves at a rather high frequency(for example, 38 kHz), higher than the frequency of the clock signal CKof the counter stage 14 so as to detect the events promptly. Inparticular, the frequency of evolution of the finite-state machine 12 isa function of the refresh frequency of the detection signals coming fromthe sensing structure 5 (and consequently depends on the type of sensorimplemented). The frequency of the clock signal CK depends, instead, forexample, on the duration of the events that are to be detected. In thisway, each time the value of the detection signals is updated, thefinite-state machine 12 can reconsider its state, irrespective of theclock signal CK.

In detail, in an initial state S1 the finite-state machine 12 isawaiting recognition of a click. Consequently, it remains in the stateS1 as long as the detection signal A_(x), A_(y), A_(z) remains below thefirst acceleration threshold A_(Th1) (event signal Ev low). The resetsignal Res is in the high state so as to maintain the count signal Cntat zero.

When the event signal Ev switches to the high value (the detectionsignal exceeds the threshold), the finite-state machine 12 evolves intothe state S2, for detection of the single-click event. The reset signalRes is set to the low state so as to enable counting, and switching ofthe event signal Ev into the low state is waited for.

If switching occurs when the count signal Cnt is greater than the limittime value T_(s1), the finite-state machine 12 evolves into the stateS3, in which the reset signal Res is set to the high state so as toreset the counter stage 14, and then into the initial state S1, awaitinga new recognition of a possible click event.

Instead, switching to the low state of the event signal Ev when thecount signal Cnt is lower than or equal to the limit time value T_(s1)is indicative of detection of the single-click event, and thefinite-state machine 12 evolves into the state S4, in which the firstinterrupt signal INT1 x, INT1 y, INT1 z corresponding to thesingle-click event switches to the high value “1”, and the reset signalRes is set to the high state.

From the state S4 the finite-state machine 12 passes to the state S5, inwhich it waits for the latency time interval to elapse, withoutmonitoring the event signal Ev (the reset signal Res is low to enablecounting). Consequently, it remains in the state S5 as long as the countsignal Cnt remains lower than or equal to the latency time value T_(s2),and, when the count signal Cnt exceeds this value, there is thetransition to the next state S6 in which the count signal Cnt is againreset to zero.

The finite-state machine 12 then evolves into the state S7 fordetection, within the pre-set time window, of a second click event. Indetail, the reset signal Res is brought back into the low state, and thefinite-state machine 12 remains in the state S7 as long as the eventsignal Ev remains low and the count signal Cnt does not exceed thewindow time value T_(s3).

If, at the end of the window interval, the event signal Ev has remainedlow, the finite-state machine 12 evolves into the state S8, in whichcounting is reset, and then into the initial state S1.

If, instead, the event signal Ev switches to the high state within theaforesaid window interval (with the count signal Cnt smaller than orequal to the window time value T_(s3)), the finite-state machine 12passes to the state S9, in which counting is reset, and then to thestate S10, for detection of the second click event (which occurs in away altogether similar to the detection of the first click event).

In detail, in the state S10, counting is enabled, and the finite-statemachine 12 remains waiting for switching of the event signal Ev into thelow state.

If switching occurs when the count signal Cnt is greater than the limittime value T_(s1), the finite-state machine 12 evolves into the stateS11, in which the reset signal Res is set to the high state so as toreset the counter stage 14, and then to the initial state S1, for a newevent detection.

Instead, switching to the low state of the event signal Ev when thecount signal Cnt is lower than or equal to the limit time value T_(s1)is indicative of recognition of the double-click event, and thefinite-state machine 12 evolves into the state S12, where the secondinterrupt signal corresponding to the double-click event INT2 x, INT2 y,INT2 z is set to “1”, and the reset signal Res is set to the high state.

From what has been described and illustrated, the advantages that thesensor device according to one or more embodiments of the inventionaffords are clear.

A single monolithic integrated device, in fact, incorporates all theoperations related to detection of events, even particular or multipleones. The dedicated integrated circuit 6 implements for this purposewithin the sensor device 2 processing not only of the instantaneousvalue of the detection signals, but also of their change over time(i.e., temporal evolution) within given time intervals. In this way, itis possible to detect, directly within the sensor device 2, eventsrepeated in time or characterized by a particular temporal evolution ofthe associated detection signals. The dedicated integrated circuit 6generates interrupt signals INT for the microprocessor circuit 3 of thecorresponding electronic apparatus 1, which is thus freed fromburdensome operations of numeric processing of the detection signals.The event detection is thus faster and more reliable.

Thanks to its particular configuration, the integrated detection circuitalso involves a limited use of resources and a low area occupation forits implementation. In particular, only one counter stage 14 is used formonitoring the various time windows, for detection of events of varioustypes (for example, single-click or double-click events). It is alsoadvantageous the possibility of varying the counter clock frequency toadapt to the characteristics of the windows for monitoring of thedetection signal (for example, as regards a corresponding range or stepof variation).

The described circuit has a high configurability, given that it issufficient to modify from outside the threshold values, the time valuesfor the count, or the modalities of state transition of the finite-statemachine 12 to adapt detection to different types of events.

Finally, it is clear that modifications and variations can be made towhat has been described and illustrated herein, without therebydeparting from the scope of the present invention, as defined in theannexed claims.

For example, the analysis stage 10 can be modified as illustrated inFIG. 7, by introducing for the analog comparator a second accelerationthreshold A_(Th2) in addition to the first acceleration thresholdA_(Th1). In particular, both thresholds can be positive and havedifferent values so as to define a detection with hysteresis of thevalue of the detection signals (in a per se known manner that is notdescribed in detail herein). The presence of a region of hysteresisenables filtering of possible bouncing and noise existing on thedetection signals. Alternatively, the first and second accelerationthreshold A_(Th1), A_(Th2) can have the same value and opposite sign soas to detect both positive and negative accelerations. The sign of thedetected acceleration could be exploited for recognizing the directionof the acceleration acting on the sensor device 2, and to determine aparticular action exerted by the user on the electronic apparatus 1 (inthe case of click events, it would be possible, for example, to detectin a different way click events coming from different areas of theapparatus, for example, from a “right” half or “left” half with respectto a corresponding median axis). Acceleration thresholds could also bevaried dynamically to take into account the d.c. component ofacceleration, by a feedback mechanism. In addition, differentacceleration thresholds could be used for the various axes of detectionx, y, z.

Furthermore, the way in which state transition if the finite-statemachine 12 occurs could be modified, as illustrated in FIG. 8 regardingsingle-event detection. In particular, according to this variant, thefinite-state machine 12 remains in the state S2 as long as the eventsignal Ev is high and the count signal Cnt is smaller than the timelimit T_(s1). If the count signal Cnt becomes greater than or equal tothe time limit T_(s1) and the event signal is still high, thefinite-state machine 12 evolves into the state S3, in which the resetsignal Res is set to the high state. It then remains in the state S3 aslong as the event signal Ev remains at the high value, and then passesinto the initial state S1 upon switching of the event signal Ev to thelow value. Instead, switching to the low state of the event signal Ev inthe state S2 (when the count signal Cnt is smaller than the limit timevalue T_(s1)) is indicative of detection of the single-click event, andthe finite-state machine 12 evolves into the state S4, in which thefirst interrupt signal INT1 x, INT1 y, INT1 z for the single-click eventswitches to the high value “1”. Basically, in the variant described(which can be applied of course also to detection of a second clickevent in the state S10 of FIG. 6), the transition of the finite-statemachine 12 from the state S2 is determined also by the value assumed bythe count signal Cnt and by the counting threshold being reached, andnot only by the value of the event signal Ev.

Furthermore, the comparator of the analysis stage 10 can be analog orelse digital, according to whether the detection signals coming from thesensing structure 5 have previously been converted into digital form ornot. In addition, it is evident that the analysis stage 10 can be madein a different way, and in particular have any configuration that willenable recognition of a potential event (for example, as described inU.S. Patent Application Publication No. 2006/0214913 filed in the nameof the present applicant).

The described circuit can be associated to different types of sensors(for example, gyroscopes or inclinometers, pressure sensors, or forcesensors), even ones not built using MEMS techniques. More in general, itcan be implemented in all the applications that require generation ofinterrupt signals upon recognition of events, using a low occupation ofresources for numeric processing and a low occupation of physical area.

It is moreover evident that the circuit described, with modification ofthe state transition in the finite-state machine 12, could be configuredso as to detect an even greater number of repeated events (for example,a hypothetical triple-click event).

Finally, the electronic apparatus 1 of one embodiment need not beprovided with a microprocessor. In this case, the interrupt signal INTgenerated continuously by the sensor device 2 could, for example,control directly a switch designed to enable/disable a given functionwithin the apparatus, or else control turning-on of a warning light, orissuing of an acoustic signal.

The various embodiments described above can be combined to providefurther embodiments. All of the U.S. patents, U.S. patent applicationpublications, U.S. patent applications, foreign patents, foreign patentapplications and non-patent publications referred to in thisspecification and/or listed in the Application Data Sheet, areincorporated herein by reference, in their entirety. Aspects of theembodiments can be modified, if necessary to employ concepts of thevarious patents, applications and publications to provide yet furtherembodiments.

These and other changes can be made to the embodiments in light of theabove-detailed description. In general, in the following claims, theterms used should not be construed to limit the claims to the specificembodiments disclosed in the specification, Abstract, and the claims,but should be construed to include all possible embodiments along withthe full scope of equivalents to which such claims are entitled.Accordingly, the claims are not limited by the disclosure.

What is claimed is:
 1. A system, comprising: a package; a chippositioned in the package; a sensor formed in the chip; and anintegrated circuit formed in the chip, the integrated circuit beingconfigured to receive a detection signal from the sensor, detect a firstevent based on detecting that the detection signal exceeds a thresholdfor no longer than a first time interval, detect a second event based ondetecting that the detection signal exceeds the threshold for no longerthan a second time interval and detecting that the second time intervaldoes not occur before expiration of a third time interval that extendsafter the first time interval, generate a first interrupt signal inresponse to detecting the first event, and generate a second interruptsignal in response to detecting the second event.
 2. The system of claim1, further comprising a microprocessor coupled to the package, themicroprocessor being configured to receive the second interrupt signalfrom the integrated circuit and activate a corresponding function basedon the second interrupt signal.
 3. The system of claim 1, wherein thefirst time window is user configurable.
 4. The system of claim 3 whereinthe sensor is a MEMS accelerometer and the second event is adouble-click event.
 5. The system of claim 4, wherein the integratedcircuit includes: a comparator stage configured set an event signal to afirst value in response to detecting that the detection signal hasexceeded the threshold and set the event signal to a second value inresponse to detecting that the detection signal no longer exceeds thethreshold; a finite state machine configured to generate a current statesignal and generate the first interrupt signal based on the event signaland a time signal; and a timing stage configured to generate the timesignal in response to a clock signal and the current state signal. 6.The system of claim 5, wherein the finite state machine is configured togenerate the current state signal based on the event signal and aprevious time signal.
 7. The system of claim 5, wherein the finite statemachine is configured to operate at a frequency higher than a frequencyof the clock signal.
 8. The system of claim 1, wherein the integratedcircuit includes: an analysis stage configured to set an event signal toa first value in response to detecting the first event and set the eventsignal to a second value in response to detecting an end of the firstevent; a timing stage configured to generate a time signal, which isindicative of the first time interval; and a finite state machine thatis configured to generate the first interrupt signal in response todetecting that the event signal has changed from the first value to thesecond value within the first time interval defined by the time signal.9. A method, comprising: receiving a detection signal from a sensor; anddetecting a first event based on detecting that the detection signalexceeds a threshold for no longer than a first time interval; detectinga second event based on detecting that the detection signal exceeds thethreshold for no longer than a second time interval and detecting thatthe second time interval does not occur before expiration of a thirdtime interval that extends after the first time interval; generating afirst interrupt signal in response to detecting the first event; andgenerating a second interrupt signal in response to detecting the secondevent.
 10. The method of claim 9, further comprising receiving, at amicroprocessor, the second interrupt signal from an integrated circuitthat performs the detecting and generating steps.
 11. The method ofclaim 9, further comprising starting the second time interval inresponse to detecting that the detection signal has gone below thethreshold within the first time interval, and starting the third timeinterval at an end of the second time interval.
 12. The method of claim9, wherein the receiving includes receiving the detection signal from aMEMS accelerometer and detecting the second event includes detecting adouble-click event.
 13. The system of claim 9, wherein detecting thefirst event includes: setting an event signal to a first event value inresponse to detecting that the detection signal has exceeded thethreshold; setting the event signal to a second event value in responseto detecting that the detection signal no longer exceeds the threshold;and detecting that the event signal switched from the first event valueto the second event value during the first time interval.
 14. The methodof claim 13, further comprising: setting a state signal to a first statevalue; setting a time signal to a first timing value, corresponding tothe first time interval, while the state signal is at the first statevalue; changing the state signal to a second state value in response todetecting that the event signal switched from the first event value tothe second event value during the first time interval; and setting thetime signal to a second timing value, corresponding to the second timeinterval, in response to changing the state signal to the second statevalue.
 15. The method of claim 14, wherein a finite state machine setsthe state signal to the first value, causes a timing circuit to set thetime signal to the first timing value, changes the state signal to thesecond state value, and causes the timing circuit to set the timingsignal to a second timing value.
 16. A device, comprising: an analysisstage configured to receive a detection signal from a sensor, comparethe detection signal to a threshold, and output an event signal having afirst event value in response to detecting that the detection signalexceeds the threshold and having a second event value in response todetecting that the detection signal does not exceed the threshold; atiming stage configured to set a first timing value corresponding to afirst time interval, a second timing value corresponding to a secondtime interval, and a third timing value corresponding to a third timeinterval; a finite state machine configured to detect a first eventbased on detecting that the event signal is at the first event value forno longer than the first time interval, detect a second event based ondetecting that the event signal is at the first event value for nolonger than the second time interval and detecting that the second timeinterval does not occur before expiration of the third time intervalthat extends after the first time interval, generate a first interruptsignal in response to detecting the first event, and generate a secondinterrupt signal in response to detecting the second event.
 17. Thedevice of claim 16, wherein the finite state machine is configured tocause the timing circuit to switch from the first time interval to thesecond time interval in response to the finite state machine detectingthe first event and the finite state machine is configured to cause thetiming circuit to switch from the second time interval to the third timeinterval in response to the finite state machine detecting that thesecond time interval has ended.
 18. The device of claim 16, wherein theanalysis stage, timing stage, and finite state machine are part of anintegrated circuit on a chip that includes the sensor, the devicefurther comprising a microprocessor coupled to the integrated circuit,the microprocessor being configured to receive the second interruptsignal from the integrated circuit and activate a corresponding functionbased on the second interrupt signal.
 19. The device of claim 16,wherein the finite state machine is configured to: set a state signal toa first state value; cause the timing circuit to set a time signal tothe first timing value while the state signal is at the first statevalue; change the state signal to a second state value in response todetecting that the event signal switched from the first event value tothe second event value during the first time interval; and cause thetiming circuit to change the time signal to the second timing value inresponse to changing the state signal to the second state value.
 20. Thedevice of claim 16, further comprising: a counter configured to count acount value; and a digital comparator coupled to the counter and thetiming circuit and configured to compare the count value with the timesignal.